package com.web709.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("articles")
@ApiModel(value = "Article对象", description = "资讯文章")
public class Article {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("文章ID")
    private Integer id;

    @ApiModelProperty("文章标题")
    private String title;

    @ApiModelProperty("文章内容")
    private String content;

    @ApiModelProperty("文章封面图片")
    private String coverImage;

    @ApiModelProperty("文章类型：1-健康资讯 2-活动新闻 3-其他")
    private Integer type;

    @ApiModelProperty("发布者ID（管理员）")
    private Integer adminId;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("状态：0-草稿 1-已发布")
    private Integer status;

    @ApiModelProperty("浏览次数")
    private Integer viewCount;
} 